import request from '@/utils/request'

// 会议列表
export function roomlist(data) {
  return request({
    url: '/system/room/list',
    method: 'get',
    data: data
  })
}

// 新增会意
export function roomadd(params) {
  return request({
    url: '/system/room',
    method: 'post',
    data: params
  })
}
// 修改会意
export function roomupdata(params) {
  return request({
    url: '/system/room',
    method: 'put',
    data: params
  })
}
// 会意详情
export function rommdetail(id) {
  return request({
    url: `/system/room/${id}`,
    method: 'get',
  })
}
// 会意详情
export function meetingdetail(id) {
  return request({
    url: `/system/meeting/${id}`,
    method: 'get',
  })
}
// 会意删除
export function delromm(id) {
  return request({
    url: `/system/room/${id}`,
    method: 'delete',
  })
}

//案件档案管理
export function attachmentlist(query) {
  return request({
    url: `/system/case/attachment/list`,
    method: 'get',
    params: query
  })
}

//案件档案管理树
export function attachmentTree(query) {
  return request({
    url: `/system/case/attachment/tree`,
    method: 'get',
    params: query
  })
}
//用印管理列表
export function applicationlist(query) {
  return request({
    url: `/system/stamp/application/list`,
    method: 'get',
    params: query
  })
}
//用印管理详情
export function applicationdetail(id) {
  return request({
    url: `/system/stamp/application/${id}`,
    method: 'get',
  })
}
//用印管理申请
export function applicationadd(query) {
  return request({
    url: `/system/stamp/application`,
    method: query.id ? 'put' : 'post',
    data: query
  })
}
//我的预定
export function meetingmine(params) {
  console.log(params)
  return request({
    url: `/system/meeting/mine`,
    method: 'get',
    params: params
  })
}
//获取所有用户
export function getAllUser(params) {
  return request({
    url: `/system/user/all`,
    method: 'get',
    params: params
  })
}

// 会议预定
export function meeting(data) {
  return request({
    url: `/system/meeting`,
    method: data.id ? 'put' : 'post',
    data: data
  })
}

// 我预定的会议室删除
export function delMet(ids) {
  return request({
    url: `/system/meeting/` + ids,
    method: "delete",
  })
}

// 我预定的会议室列表
export function select(params) {
  return request({
    url: `/system/meeting/select`,
    method: "get",
    params
  })
}


// 获取统计信息
export function getAllData(params) {
  return request({
    url: `/system/stamp/application/statistics/count`,
    method: "get",
    params
  })
}
